import { request } from "../utils"
import type { ResType } from "./shared";
const URL = '/takeAway_user'

export type ResponseUserInfo = {
        avatar_file: {
            extname: string;
            name: string;
            url: string
        };
        nickname: string;
        username: string;
        _id:string
}

export const getUserInfoAPI = async () => {
    return  request<ResType<ResponseUserInfo>>({
        method: "GET",
        url: `${URL}/userInfo`
    })
}